<?php if(isset($category)): ?>
    <p><?php echo $category->record->get('data.description', 'No further description available.'); ?></p>
    <p>There are <?php echo ($drinks) ? anchor('/drink/show/' . $category->id, count($drinks), '') : 0;?>
       drinks listed under this category.
    </p>
    <?php if(count($drinks) > 0): ?>
    <table class="table-condensed table-striped">
	<tr>
	    <th>Name</th>
	    <th>Rating</th>
	</tr>

	<?php foreach($drinks as $drink): ?>
	<tr>
	    <td><?php echo anchor('drink/details/' . $drink->id, $drink->name, ''); ?></td>
	    <td><?php echo $drink->get_AvgRating();?></td>
	</tr>
	<?php endforeach; ?>
    </table>
    <?php endif; ?>
<?php else: ?>
    <div class="error">No category found!</div>
<?php endif; ?>

